package com.yc.service.Impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.yc.dao.UserinfoMapper;
import com.yc.model.Userinfo;
import com.yc.model.UserinfoExample;
import com.yc.service.UserService;
@Service
public class UserServiceImpl implements UserService
{
@Autowired
private UserinfoMapper um;
	
	@Override
	public int deleteByExample(UserinfoExample example)
	{
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int deleteByPrimaryKey(Integer userid)
	{
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int insert(Userinfo record)
	{
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int insertSelective(Userinfo record)
	{
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public List<Userinfo> selectByExample(UserinfoExample example)
	{
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Userinfo selectByPrimaryKey(Integer userid)
	{
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public int updateByExampleSelective(Userinfo record, UserinfoExample example)
	{
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int updateByExample(Userinfo record, UserinfoExample example)
	{
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int updateByPrimaryKeySelective(Userinfo record)
	{
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int updateByPrimaryKey(Userinfo record)
	{
		// TODO Auto-generated method stub
		return 0;
	}

	//登录实现
	@Override
	public	Userinfo loginUser(String userAccount, String userPass)
	{
		// TODO Auto-generated method stub
		return um.loginUser(userAccount, userPass);
	}
	//修改用户密码
	@Override
	public int modifyUserService(Userinfo us) {
		// TODO Auto-generated method stub
		return um.modify(us);
	}

	@Override
	public int addUser(Userinfo us) {
		
		return um.addUser(us);
	}

	@Override
	public int getMaxPage(int num) {
		// TODO Auto-generated method stub
		return 0;
	}

	

	@Override
	public List<Userinfo> findByAllUserService() {
		// TODO Auto-generated method stub
		return um.selectByAllUser();
	}

	@Override
	public Userinfo getUserById(Integer userId) {
		// TODO Auto-generated method stub
		return um.selectByIdUser(userId);
	}

	@Override
	public void ModifyUserById(Userinfo record) {
	um.modifyUser(record);
		
	}

	@Override
	public List<Userinfo> selectByOnlineChef() {
		
		return um.selectByOnlineChef();
	}

}
